package com.kayden.ioc.service;


import com.kayden.ioc.model.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class UserService {


    //@Qualifier("s1")
    @Autowired
    private Student s3;
//    @Resource(name = "s2")//是按照bean的名称进⾏注⼊。通过name属性指定要注⼊的bean的名称。
//    private Student s4;

    public void print(){
        System.out.println("do Service");
        System.out.println(s3);
    }

}
